#-*- encoding: utf-8 -*-

xml = """<div id="top"><div>Content</div><div><div>Content I Want</div></div></div>""" 
xml = '<h1><a href="http://wubotao.com/archives/698.html" title="Permalink to Android开发常用的Intent的URI及示例" rel="bookmark">Android开发常用的Intent的URI及示例</a></h1>'

from BeautifulSoup import BeautifulSoup 

p = BeautifulSoup(xml) 
print p.h1.a['href']
# returns a list of texts 
#print p.div.div.findNextSibling().div.contents 
# returns a list of texts 
#print p.div.div.findNextSibling().div(text=True) 
# join (and strip) the values 
#print ''.join(s.strip() for s in p.div.div.findNextSibling().div(text=True)